<template>
    <div>
        <el-button type="text" class="back" @click="gotoLogin">返回<i class="el-icon-back"></i></el-button>
        <div class="header">
            <div class="headertext">欢迎使用网上求职系统</div>
            <div class="headertext emailbox" @click="gotoEmailBox">收件箱</div>
            <div class="headertext">{{ SeekersName }}</div>
            <div class="headertext"><el-avatar
                    src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"></el-avatar></div>
        </div>
    </div>
</template>
<script>
import axios from 'D:\\job_management\\src\\axiosConfig.js'
export default {
    data() {
        return {
            SeekersName: '张三',
        }
    },
    created() {
        axios.get(`/seekers/infomation/${this.$store.state.account}`,
            {


            },
        )
            .then(response => {
                this.$data.SeekersName = response.data.data.seekersName
            })
            .catch(error => {
                console.log(error);
            })
    },

    methods: {
        gotoLogin() {
            this.$router.push('/')
        },
        gotoEmailBox() {
            this.$store.commit('changePageto', '收件箱')
        }
    }
}
</script>
<style scoped>
.header {
    width: 100%;
    height: 135px;
    background-color: rgb(0, 180, 179);
    display: flex;
}

.headertext {
    display: inline-block;
    font-weight: 700;
    font-size: 25px;
    margin-top: 40px;
    padding-right: 50px;
}

.header div:first-child {
    margin-right: auto;
    padding-left: 50px;
}

.back {
    position: absolute;
    left: 10px;
    top: -10px;
    color: black;
    font-size: 20px;
}

.emailbox {
    cursor: pointer
}
</style>